<template>
    <div>
      <el-upload
        class="upload-demo"
        drag
        action="http://localhost:9100/video/upload"
        :on-success="handleAvatarSuccess"
        :before-upload="beforeAvatarUpload"
        multiple>
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
      </el-upload>
    </div>
</template>

<script>
  export default {
    data() {
      return {
        imageUrl: ''
      };
    },
    methods: {
      handleAvatarSuccess(res, file) {
        this.imageUrl = URL.createObjectURL(file.raw);
      },
      beforeAvatarUpload(file) {
        console.log(file.type)
      }
    }
  }
</script>

<style scoped>

</style>
